home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / graphics / circuit_macros / examples / ex5.m4 < prev    next >
Text File  |  1994-03-13  |  2KB  |  69 lines

  1. .PS
  2. define(`HOMELIB_',`/u/aplevich/lib')
  3. ifdef(`dline',,`include(HOMELIB_/darrow.m4)')
  4.  
  5. del = 0.2
  6. dx = 0.1
  7. circlerad = boxht*3/8
  8. indel = boxht/3
  9. fillval = 0.8
  10.  
  11. B1:[ down_
  12.    S1:box fill_ "$\bar{\mbox{C}}$"
  13.    S2:box fill_ with .nw at S1.se+(dx,-dx) "C"
  14.    dline(down_ dx)
  15.    dright
  16.    {Sum: circle with .c at (S1,Here)-(indel/2,0)}
  17.    darrow(to Sum.e)
  18.  
  19.    NW: S1.nw+(-del,dx)
  20.    SE: (S2.e,Sum.s)+(del,-dx)
  21.    right_; shadebox(box wid SE.x-NW.x ht NW.y-SE.y with .nw at NW)
  22.  
  23.    move to S1.s+(indel/2,0)
  24.    dline(to (Here,S2),,t); dleft; darrow(to S2.w)
  25.    darrow(from (Sum,S1.s) to Sum.n)
  26.  
  27.    move to (SE,S2)+(del,0)
  28.    left_; "\bf u" ljust
  29.    {box invis fill_(1) ht dlinewid wid 2*del-dx with .e at Here+(-dx,0)}
  30.    dend ; darrow(to S2.e)
  31.  
  32.    move to Sum.w+(0.01,0); left_
  33.    {box invis fill_(1) ht dlinewid wid linewid with .e at Here+(-dx,0)}
  34.    darrow(to (NW,Sum)-(del,0))
  35.    "{\bf y}$-${\bf D}{\bf u}" rjust at Here+(del,del*3/4)
  36.    ]
  37. box invis wid del ht del "(a)" at last [].s+(0,-del)
  38.  
  39. [  down_
  40.    S1:box fill_ "$\bar{\mbox{O}}$"
  41.    S2:box fill_ with .nw at S1.se+(dx,-dx) "O"
  42.  
  43.    dline(from S2.n to (S2,S1)-(0,indel/2),,t)
  44.    up_; dleft
  45.    darrow(to (S1.e,Here))
  46.  
  47.    NW: S1.nw+(-del,del)
  48.    SE: S2.se+(2*del,-del-dx)
  49.    right_; shadebox(box wid SE.x-NW.x ht NW.y-SE.y with .nw at NW)
  50.    
  51.    move to (SE,S1)+(del,indel/2); left_
  52.    {box invis fill_(1) ht dlinewid wid 2*del}
  53.    {"{\bf u}" ljust} ; dend ; dline(left_ 2*del,,t)
  54.    dtee(`up_')
  55.    {darrow(to (S1.e,Here),t)}
  56.    dline(to (Here,S2),t,t)
  57.    down_;dright
  58.    darrow(to S2.e)
  59.  
  60.    dline(from S2.s down_ dx)
  61.    dright
  62.    L: (NW,Here)-(del,0)
  63.    {box invis fill_(1) wid Here.x-L.x ht dlinewid}
  64.    darrow(to L)
  65.    "{\bf y}$-${\bf D}{\bf u}" rjust at Here+(del,del*3/4)
  66.    ] with .sw at B1.se + (boxwid/2,0)
  67. box invis wid del ht del "(b)" at last [].s+(0,-del)
  68. .PE
  69.